package com.example.certificate.utils;

/**
 * @Description: Result参数枚举
 * @Author: winter
 * @CreateDate: 2019-01-11 9:38
 * @Version: 1.0.1
 */
public enum ResultConstant {

    //请先删除子路由
    DEL_SON_ROUTER_ERROR("50002","Delete the child route first"),

    //发送验证码失败
    SEND_CODE_LOSE("60000","SMS verification code requests are frequent, try again later!"),

    //短信验证码错误
    SEND_CODE_MISTAKE("60001","The SMS verification code is incorrect"),

    //服务异常
    INTERNAL_SERVER_ERROR("20000", "internal.server.error"),

    //接口调用失败
    INTERFACE_CALL_FAIL("20001", "iface.call.fail"),

    //业务处理成功
    SUCCESS("10000", "success"),

    //token过期或无效(包含未登陆)
    ACCESS_DENIED("30000", "access.denied"),

    //参数错误
    PARAM_ERROR("40010", "param.error"),

    //无操作权限
    PERMISSION_DENIED("30001", "permission.denied"),

    //操作失败
    OPERATE_FAIL("40000", "operation.failed"),

    //文件不存在
    NO_EXIST("40002", "no.exist"),

    //编辑错误
    EDIT_FAIL("40003", "edit.fail"),

    //文件存在
    IS_EXIST("40001", "is.exist"),

    //添加错误
    ADD_FAIL("40004", "add.fail"),

    //删除错误
    DELETE_FAIL("40005", "delete.fail"),

    //导入数据错误
    IMPORT_FAIL("40006", "import.fail"),

    //文件类型错误
    FILE_TYPE_ERROR("40007", "file.type.error"),

    //校验数据错误
    CHECK_FAIL("40008", "check.fail"),

    //查询错误
    QUERY_FAIL("40009","query.fail"),

    //HTTP方法不支持
    HTTP_METHOD_NOT_SUPPORT("50000", "http.method.not.support"),

    //用户名或密码错误
    USERNAME_PASSWORD_ERROR("30001", "user.password.error"),

    //消息状态错误
    MSG_CODE_ERROR("40010", "msg.code.error"),

    //其他所有错误
    OTHER_ERROR("60000", "other.error"),

    //用户被禁用
    USER_DISABLE("400023","The user has been disabled")
    ;


    public String resultCode;
    public String message;

    ResultConstant(String resultCode, String message) {
        this.resultCode = resultCode;
        this.message = message;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
